In recent years, a home network for promoting sharing of various contents by connecting home devices through a network has been realized. As one form of implementing the home network, there is a suggested star-formed connection in which each home device such as PC and digital camera, and an AV server for storing contents are respectively connected to a router, which is placed in a home. The router connects a network in a home with a network outside the home. The AV server positioned in a home has a function of temporally storing various contents obtained from the network outside the home via the router or various contents broadcasted by means other than networks, for example, a digital broadcast, and of transmitting each content to a receiving apparatus which has requested the content according to a request from each device.
On the other hand, in the case of dealing with data requiring copyright protection such as latest movies, television programs by pay broadcast, and music, it is necessary to protect the copyrights of such data. As an effective method for protecting copyrights, there is a method of adding restrictions on data use by encrypting data which requires a copyright protection.
For example, when audio video data (hereinafter, referred to as AV data) needs to be protected for its copyrights in the case of being transmitted through a network, the AV data is encrypted and transmitted. An example of implementing this process is standardized as a Digital Transmission Protection over Internet Protocol) method.
The DTCP-IP method has functions of authentication and key revocation, and when AV data is transmitted, copyright protection is realized by encrypting data requiring the copyright protection, and transmitting the encrypted data while removing unauthorized devices.
Furthermore, the use of AV data which requires copyright protection is generally restricted to an individual use in a family so that it is necessary to restrict the AV server in a home to distribute the AV data without limitations to unspecific receiving apparatuses placed outside the home.
In the DTCP-IP method, Time to Live (TTL) is used so as to restrict an achievement range of a command to be transmitted. Note that, TTL indicates a Time to Live of a packet in an IPv4 (a value of Time to Live field), and corresponds to the number of relays (a value of Hop Limit field) in an IPv6. This indicates that the number of routers which can be passed through by an IP packet can be set based on a value set in the TTL field included in the IP packet header.
However, the TTL field of the IP packet header is not protected against manipulations. Therefore, there is a problem that the TTL field can be manipulated by a relay device.
Accordingly, there is a suggested transmitting/receiving system of measuring an RTT (Round Trip Time) which is a transmission time for a round trip between a transmitting apparatus which transmits AV data and a receiving apparatus which receives the AV data, and of allowing an authentication when it is determined that the measured RTT is shorter than a predetermined restriction time (for example, refer to Patent Reference 1).
In this data transmitting/receiving system, there is a possibility that the measured RTT is shorter than the actual time if an unauthorized device is intervened, in the case of measuring a round trip time RTT by measuring the period of time from the transmission of the measurement request to the reception of its response. Therefore, it is necessary to execute detection processing by both of the device for receiving a measurement request and the device of receiving a request response, in order to detect whether the handshaking between the measurement request and the request response is not intervened by an unauthorized device.
Hereinafter, a conventional data transmitting/receiving system is described with reference to FIG. 10 and FIG. 11.
FIG. 10 shows a flow of a process from authentication to encrypted transmission when an encrypted transmission is performed by the transmitting apparatus and the receiving apparatus.
As shown in the diagram, first, the receiving apparatus transmits an authentication request to the transmitting apparatus and starts a measurement authentication process S101. After the authentication process S101, the transmitting apparatus and the receiving apparatus execute a transmission time measurement process S102 so as to measure an RTT of the receiving apparatus. In the case where the RTT is less than or equal to a reference value, the transmitting apparatus and the receiving apparatus execute a key exchange authentication process S103, and execute a key exchange process S104 when the authentication process succeeds.
After the key exchange process, the transmitting apparatus encrypts and transmits the AV data, while the receiving apparatus generates a decryption key using an exchange key received in the key exchange process, and decrypts the received encrypted data (S105).
FIG. 11 is a flowchart showing a detailed process of the transmission time measurement process S102.
First, the transmitting apparatus generates transmitting apparatus measurement information, stores the transmitting apparatus measurement information into the measurement request, and transmits the measurement request (S111). The receiving apparatus verifies the received transmitting apparatus measurement information (S112). When the measurement information is incorrect, the receiving apparatus terminates the process as an error. When the measurement information is correct, the receiving apparatus generates receiving apparatus measurement information (S113), stores the receiving apparatus measurement information into a measurement request response, and transmits the measurement request response. The transmitting apparatus measures an RTT when receiving the measurement request response (S114).
Following that, the transmitting apparatus checks the measurement value of the RTT (S115), and when the measurement value is less than or equal to a reference value (Tmax), terminates the measurement processing, and proceeds to the next processing. When the measurement value is greater than the reference value, the transmitting apparatus checks the number of measurements (S116). When the number of measurements is not reached the predetermined number of measurements, the transmitting apparatus returns to S111, and repeats the measurement. After transmitting the measurement request response, the receiving apparatus is in a wait state for receiving the request. When receiving the measurement request, the receiving apparatus returns to S111, and repeats the measurement (S117).
Next, the transmitting apparatus verifies whether or not the receiving apparatus measurement information stored in the received measurement request response is correct (S118), and when the measurement information is incorrect, terminates the processing as an error. When the measurement information is correct, the transmitting apparatus determines that the measurement value is less than or equal to the reference value and is the correct value.    Patent Reference 1: Japanese Laid-Open Patent Application No. 2004-194295 (page 11)